<?php
if (!defined('FosfoaSystem')) {
    exit(1);
}
import($GLOBALS['spConfig']['controller_path'] . '/general.php');
/**
 * 文件处理
 */
class upload extends general
{
    function __construct()
    {
        parent::__construct();
    }
    function file()
    {
        header('Content-Type: text/html; charset=UTF-8');
        $immediate=$this->spArgs('immediate');
        $filetype='txt,rar,zip,jpg,jpeg,gif,png,swf,wmv,avi,wma,mp3,mid';
        $upfile = spClass("uploadFile");
        $upfile->set_immediate($immediate);
        //$upfile->set_filetypes($filetype);  //动态设定了允许的上传文件
        $upfile->set_diydir('upload');  //动态的更改了上传文件夹保存位置
        echo $files = $upfile->fileupload();  //开始上传,可跟一个参数,动态改变上传文件的inputname
    }
}